package com.owc.domain.vo.admin;

import com.owc.common.tool.DateUtils;
import com.owc.common.tool.UtilsService;
import com.owc.domain.PageVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

@Getter
@NoArgsConstructor
@ToString
public class BaseVo extends PageVo implements Serializable {

    @ApiModelProperty("手机号码")
    private String phone;

    @ApiModelProperty("状态")
    private Integer status;

    @ApiModelProperty("时间开始")
    private String timeStart;

    @ApiModelProperty("时间结束")
    private String timeEnd;

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setTimeStart(String timeStart) {
        if(!UtilsService.isEmpty(timeStart))
        this.timeStart = timeStart + DateUtils.DAY_START_HOUR;
    }

    public void setTimeEnd(String timeEnd) {
        if(!UtilsService.isEmpty(timeEnd))
            this.timeEnd = timeEnd + DateUtils.DAY_LAST_HOUR;
    }
}
